package com.example.message.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.example.project.core.domain.BaseEntity;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 通知主表
 */
public class Message extends BaseEntity{
    
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
     * 通知ID
     */
    @TableId(type = IdType.AUTO)
    private Long messageId;
    
    /**
     * 通知标题
     */
    private String title;
    
    /**
     * 通知内容
     */
    private String content;
    
    /**
     * 通知类型（1：系统通知，2：业务通知，3：公告，4：提醒）
     */
    private Integer messageType;
    
    /**
     * 优先级（1：低，2：中，3：高，4：紧急）
     */
    private Integer priority;
    
    /**
     * 发送方式（1：站内信，2：邮件，3：短信，4：微信，5：多方式）
     */
    private Integer sendMethod;
    
    /**
     * 发送范围类型（1：个人，2：角色，3：部门，4：岗位，5：全体）
     */
    private Integer targetType;
    
    /**
     * 发送目标ID（用户ID、角色ID、部门ID、岗位ID，全体为0）
     */
    private String targetIds;
    
    /**
     * 发送目标名称
     */
    private String targetNames;
    
    /**
     * 业务类型
     */
    private String businessType;
    
    /**
     * 业务ID
     */
    private String businessId;
    
    /**
     * 过期时间
     */
    private LocalDateTime expireTime;
    
    /**
     * 状态（0：草稿，1：已发送，2：已撤销）
     */
    private Integer status;
    
    /**
     * 发送人ID
     */
    private Long senderId;
    
    /**
     * 发送人姓名
     */
    private String senderName;
    
    /**
     * 发送时间
     */
    private LocalDateTime sendTime;
    
    /**
     * 删除标志（0：正常，1：删除）
     */
    @TableLogic
    private Integer delFlag;

	/**
	 * 接收ID
	 */
	private Long receiveId;

    /**
     * 阅读状态（0：未读，1：已读）
     */
    private Integer readStatus;
    
    /**
     * 处理状态（0：未处理，1：已处理，2：忽略）
     */
    private Integer handleStatus;
    
    /**
     * 通知接收列表（非数据库字段）
     */
    @TableField(exist = false)
    private List<MessageReceive> receiveList;
    
    /**
     * 显示颜色（非数据库字段）
     */
    @TableField(exist = false)
    private String displayColor;

    // Getter and Setter methods
    public Long getMessageId() { return messageId; }
    public void setMessageId(Long messageId) { this.messageId = messageId; }
    
    public String getTitle() { return title; }
    public void setTitle(String title) { this.title = title; }
    
    public String getContent() { return content; }
    public void setContent(String content) { this.content = content; }
    
    public Integer getMessageType() { return messageType; }
    public void setMessageType(Integer messageType) { this.messageType = messageType; }
    
    public Integer getPriority() { return priority; }
    public void setPriority(Integer priority) { this.priority = priority; }
    
    public Integer getSendMethod() { return sendMethod; }
    public void setSendMethod(Integer sendMethod) { this.sendMethod = sendMethod; }
    
    public Integer getTargetType() { return targetType; }
    public void setTargetType(Integer targetType) { this.targetType = targetType; }
    
    public String getTargetIds() { return targetIds; }
    public void setTargetIds(String targetIds) { this.targetIds = targetIds; }
    
    public String getTargetNames() { return targetNames; }
    public void setTargetNames(String targetNames) { this.targetNames = targetNames; }
    
    public String getBusinessType() { return businessType; }
    public void setBusinessType(String businessType) { this.businessType = businessType; }
    
    public String getBusinessId() { return businessId; }
    public void setBusinessId(String businessId) { this.businessId = businessId; }
    
    public LocalDateTime getExpireTime() { return expireTime; }
    public void setExpireTime(LocalDateTime expireTime) { this.expireTime = expireTime; }
    
    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
    
    public Long getSenderId() { return senderId; }
    public void setSenderId(Long senderId) { this.senderId = senderId; }
    
    public String getSenderName() { return senderName; }
    public void setSenderName(String senderName) { this.senderName = senderName; }
    
    public LocalDateTime getSendTime() { return sendTime; }
    public void setSendTime(LocalDateTime sendTime) { this.sendTime = sendTime; }
    
    public Integer getDelFlag() { return delFlag; }
    public void setDelFlag(Integer delFlag) { this.delFlag = delFlag; }
    
    public Long getReceiveId() {
		return receiveId;
	}
	public void setReceiveId(Long receiveId) {
		this.receiveId = receiveId;
	}
	
	public Integer getReadStatus() {
		return readStatus;
	}
	public void setReadStatus(Integer readStatus) {
		this.readStatus = readStatus;
	}
	
	public Integer getHandleStatus() {
		return handleStatus;
	}
	public void setHandleStatus(Integer handleStatus) {
		this.handleStatus = handleStatus;
	}
	
	public List<MessageReceive> getReceiveList() { return receiveList; }
    public void setReceiveList(List<MessageReceive> receiveList) { this.receiveList = receiveList; }
    
    public String getDisplayColor() { return displayColor; }
    public void setDisplayColor(String displayColor) { this.displayColor = displayColor; }
}